package cocurrency.semaphore;

import java.util.concurrent.Semaphore;

/**
 * Created by luzl on 4/6/2017.
 */
public class SemaphoreTest {
    public static void main(String[] args){
        Semaphore semaphore=new Semaphore(10);
        int count=10000;
        while(count>0){
            count=count-1;
            SemaphoreThread thread=new SemaphoreThread("Seq"+count,semaphore);
            thread.start();
        }
    }
}
